import type {
    BannerItem,
    CategoryItem,
    HotItem,
    GuessItem
} from '@/types/home'
import type {
    PageParams,
    PageResult
} from '@/types/global'
import { http } from '../utils/http'
// distributionSite = 1 在首页展示
export const getHomebannerAPI = (distributionSite = 1) => {
    return http<BannerItem[]>({
        method: 'GET',
        url: '/home/banner',
        data: {
            distributionSite
        }
    })
}
export const getHomeCategoryAPI = () => {
    return http<CategoryItem[]>({
        method: 'GET',
        url: '/home/category/mutli',

    })
}

export const getHomeHotAPI = () => {
    return http<HotItem[]>({
        method: 'GET',
        url: '/home/hot/mutli',

    })
}

export const getHomeGoodsGuessAPI = (data?: PageParams) => {
    return http<PageResult<GuessItem>>({
        method: 'GET',
        url: '/home/goods/guessLike',
        data
    })
}